package com.tulingxueyuan.mall.modules.pms.mapper;

import com.tulingxueyuan.mall.modules.pms.model.PmsProductAttribute;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tulingxueyuan.mall.dto.RelationAttrInfoDto;

import java.util.List;

/**
 * <p>
 * 商品属性参数表 Mapper 接口
 * </p>
 *
 * @author SiXiaoLong
 * @since 2022-10-13
 */
public interface PmsProductAttributeMapper extends BaseMapper<PmsProductAttribute> {
//    @Select("SELECT pcar.product_attribute_id,ppa.product_attribute_category_id FROM pms_product_category_attribute_relation pcar LEFT JOIN pms_product_attribute ppa on pcar.product_attribute_id = ppa.id WHERE pcar.product_category_id = #{id}")
//    @Results(id = "RelationAttrInfoDto",value = {@Result(column = "product_attribute_id",property = "attributeCategoryId"),@Result(column = "product_attribute_id",property = "attributeId")} )
//    @ResultMap(value = {"RelationAttrInfoDto"})
    List<RelationAttrInfoDto> getRelationAttrInfoById(Long id);
}
